package com.bawei.mall.cart.domain.req;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CartAddReq {


    @NotNull(message = "商品Id不可以为空")
    @Min(value = 1, message = "商品Id入参不合法")
    private Long productId;


    @NotEmpty(message = "商品规格不可以为空")
    private String productSku;


    @NotNull(message = "商品添加数量不可以为空")
    @Min(value = 1, message = "商品添加数量入参不合法")
    private Long number;

}
